#define RCC_AHB1ENR  (*((volatile unsigned int*)(0x40023800 + 0x30)))
#define GPIOI_MODER   (*((volatile unsigned int*)(0x40022000 + 0x00)))
#define GPIOI_IDR     (*((volatile unsigned int*)(0x40022000 +0x10)))
#define GPIOI_PUPDR   (*((volatile unsigned int*)(0x40022000 + 0x0C)))


void key_init(void)
{
	RCC_AHB1ENR |= 1<<8;
	GPIOI_MODER &=~(3<<8);//Ⱥ?Ȩ??ªȺ?00000011
	//GPIOI_MODER &=~(1<<8);
	GPIOI_PUPDR &=~(1<<9);
	GPIOI_PUPDR |= 1<<8;//?????aȦ?Ȥ-?ªȺ?
}
void delay(volatile unsigned int time )
{
	while(time--);
}

